# 时间复杂度：O(n2)
# 空间复杂度：O(n2)

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        for i in range(len(nums)):
            dif=target-nums[i]
            for j in range(i+1,len(nums)):
                if nums[j]==dif:
                    return [i,j]
        